Function Allocate_Ldt_Descriptors (Count : word) : word;
Allocate_ldt_descriptors allocates Count descriptors in the Local Descriptor Table (LDT). The descriptors allocated must be initialized by the application with other function calls.
The function returns a base descriptor with a limit and size value set to zero.
Notes:
None.
SetSegmentBaseAddress, SetSegmentLimit, GetLinearAddr, FreeLdtDescriptor, GetNextSelectorIncrementValue
uses go32; var VGAsel : word; r : trealregs; begin {...} r.realeax := $13; realintr($10, r); { set VGA mode } {...} VGAsel := allocate_ldt_descriptors(1); { allocate one descriptor to the VGA } set_segment_base_address(VGAsel, get_linear_address($A0000, $FFFF)); { set the base address to the VGA } set_segment_limit(VGAsel, $FFFF); { set the limit of the descriptor } {...} seg_fillchar(VGAsel, 100*320+6, 1, 15); { put a pixel at (6/100) in color 15 } readln; {...} free_ldt_descriptor(sel); r.realeax := $3; realintr($10, r); { set textmode again } {...} end.